/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.f1x.api.message.fields;

// Generated by org.f1x.tools.DictionaryGenerator from QuickFIX dictionary
public enum IOIQualifier implements org.f1x.api.message.types.ByteEnum {
	ALL_OR_NONE((byte)'A'),
	MARKET_ON_CLOSE((byte)'B'),
	AT_THE_CLOSE((byte)'C'),
	VWAP((byte)'D'),
	IN_TOUCH_WITH((byte)'I'),
	LIMIT((byte)'L'),
	MORE_BEHIND((byte)'M'),
	AT_THE_OPEN((byte)'O'),
	TAKING_A_POSITION((byte)'P'),
	AT_THE_MARKET((byte)'Q'),
	READY_TO_TRADE((byte)'R'),
	PORTFOLIO_SHOWN((byte)'S'),
	THROUGH_THE_DAY((byte)'T'),
	VERSUS((byte)'V'),
	INDICATION_WORKING_AWAY((byte)'W'),
	CROSSING_OPPORTUNITY((byte)'X'),
	AT_THE_MIDPOINT((byte)'Y'),
	PRE_OPEN((byte)'Z');

	private final byte code;

	IOIQualifier (byte code) {
		this.code  = code;
	}

	public byte getCode() { return code; }

	public static IOIQualifier parse(String s) {
		switch(s) {
			case "A" : return ALL_OR_NONE;
			case "B" : return MARKET_ON_CLOSE;
			case "C" : return AT_THE_CLOSE;
			case "D" : return VWAP;
			case "I" : return IN_TOUCH_WITH;
			case "L" : return LIMIT;
			case "M" : return MORE_BEHIND;
			case "O" : return AT_THE_OPEN;
			case "P" : return TAKING_A_POSITION;
			case "Q" : return AT_THE_MARKET;
			case "R" : return READY_TO_TRADE;
			case "S" : return PORTFOLIO_SHOWN;
			case "T" : return THROUGH_THE_DAY;
			case "V" : return VERSUS;
			case "W" : return INDICATION_WORKING_AWAY;
			case "X" : return CROSSING_OPPORTUNITY;
			case "Y" : return AT_THE_MIDPOINT;
			case "Z" : return PRE_OPEN;
		}
		return null;
	}

}